1. Field of the Invention
The present invention relates to printers, and more specifically to a method and apparatus for performing raster operations in a printer.
2. Related Art
Printers are often used to print a specified content (“page content”) on medium such as paper. Typically, a printer receives a request from an external system such as a personal computer, and prints the content specified in the request. The content to be printed is generally specified by page description languages (PDL), as is well known in the relevant arts.
An interpreter (within a printer) generally converts the statements in PDL to a corresponding display list. A display list contains low level primitives (elements) such as lines and trapezoids which can be used to represent various high level objects such as images and fonts. Bit maps are generated based on the primitives in the display lists by, what is commonly referred to as, rendering. A printer engine, within the printer, then prints the bitmap on paper.
PDLs such as Printer Control Language (PCL, specified by Hewlett Packard Company, www.hp.com) often define various raster operations (ROPs) to be applied while rendering. The ROPs specify the manner in which source, paint and destination need to be combined to obtain the final bitmap (representing the page content) which has to be printed. As is well known, a destination generally refers to a bit-map formed by rendering the display-list elements up to that point of time. A source refers to a current display list element being rendered, and paint refers to the shade of color or the pattern bit-map that the source may be filled with.
In the PCL based systems, a total of 256 ROPs are known to be defined. For further information on PCL the reader is referred to a document entitled, “PCL XL Feature Reference: Protocol Class 2.0”, available from Hewlett-Packard Company (www.hp.com), which is incorporated in its entirety herewith.
In general, raster operations need to be implemented while satisfying (or balancing) several requirements. One general requirement is that the raster operations be performed quickly. Another typical requirement is that the implementation be easily portable to better (e.g., faster) environments (e.g., a processor which operates at a higher speed). In systems implemented substantially in the form of software, there may be a requirement to minimize the memory requirements. Therefore, what is needed is a method and apparatus to perform raster operations while meeting one or more of such requirements.